/**
 * Copyright 2025 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

@use "sass:color";

@use "@angular/material" as mat;

$background-error: mat.m2-get-color-from-palette(mat.$m2-red-palette, 50);
$border-error: mat.m2-get-color-from-palette(mat.$m2-red-palette, 100);
$icon-error: mat.m2-get-color-from-palette(mat.$m2-red-palette, 400);

$background-warning: mat.m2-get-color-from-palette(mat.$m2-yellow-palette, 50);
$border-warning: mat.m2-get-color-from-palette(mat.$m2-yellow-palette, 300);
$icon-warning: mat.m2-get-color-from-palette(mat.$m2-yellow-palette, 700);

$background-info: mat.m2-get-color-from-palette(mat.$m2-blue-palette, 50);
$border-info: mat.m2-get-color-from-palette(mat.$m2-blue-palette, 300);
$icon-info: mat.m2-get-color-from-palette(mat.$m2-blue-palette, 700);

.container {
  display: flex;
  flex-direction: row;
  border-radius: 10px;
  border: 2px solid white;

  mat-icon {
    margin: 4px 5px 0px 10px;
    transform: scale(80%);
  }

  &.error {
    background-color: $background-error;
    border-color: $border-error;

    mat-icon {
      color: $icon-error;
    }
  }

  &.warning {
    background-color: $background-warning;
    border-color: $border-warning;

    mat-icon {
      color: $icon-warning;
    }
  }

  &.info {
    background-color: $background-info;
    border-color: $border-info;

    mat-icon {
      color: $icon-info;
    }
  }
}

.hint {
  margin: 0;
  padding: 7px 10px 4px 0px;
}
